package factory.simpleFactory;

/**
 * 乘客角色
 */
public class Magnate {
    public static void main(String[] args) throws Exception {
        //向上造型：父类的引用指向子类的对象(提高程序的可扩展性。利于代码维)
        factory.simpleFactory.Car car = factory.simpleFactory.Driver.driverCar("benz");
        car.drive();
    }
}
